<style type="text/css" media="screen">
#calender_big {
   background-color: #ffd;
   border: 1px solid #fc0;
   margin-left:  0px;
 margin-right: 0px;

 }
 #calender_big table {
   
   margin: 0px;
   padding: 1px 1px 1px 1px;
   font-size: 8px;
   border-collapse: collapse;
 font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
 font-size: 14px;
 }
 
 #calender_big td.day {
   padding: 4px;
 font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
 font-size: 14px;
 }
 #calender_big td.sprint_active  {
   padding: 4px;
   background-color: #ffa;
 }

 #calender_big td.sprint_today  {
   padding: 4px;
   background-color: #ddd;
 }



</style>
<script type="text/javascript">
<!--
function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{


    if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        //obj.style.display = iState ? "block" : "none";
		if (obj.style.display == 'block')
		{
			obj.style.display = 'none';
		}
		else
		{
			obj.style.display = 'block';
		}
    }
// not tested!
    else if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
// not tested
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
}
// -->
</script>


<h2>Calendar Details</h2>

<div id="calender_big">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
	<% @sprint.months_sprint_belongs_in.each do |sprintmonth| %>
	<%= calendar({:year => sprintmonth.year, :month => sprintmonth.month, :abbrev => (0..0), :table_class => "calender_big"}) do |d| 
	    cell_attrs = {:class => 'day'}
	    if @sprint.active?(d)
	      cell_text = link_to(d.mday, {:controller => 'home', :action => 'drop_day', :id=> @sprint.id, :date => d}, :confirm => "Are you sure you want to drop the #{d.mday}th from the sprint?") 
	     
	      cell_attrs[:class] = 'sprint_active'
		else
		  cell_text = link_to(d.mday, {:controller => 'home', :action => 'add_day', :id=> @sprint.id, :date => d}, :confirm => "Are you sure you want to add the #{d.mday}th to the sprint?") 
	    end
	
	    if Time.today.day ==d.day
		  cell_attrs[:class] = 'sprint_today'
		end
	
	  #Estimate.find(:all).each do |e|
	  #  if e.date == d
	  ##    cell_text << e.id
	   #   cell_attrs[:class] = 'specialDay'
	   # end
	  #end
	    [cell_text, cell_attrs]
	  end
	%>	
	<% end %>		
  </div>
